package com.alex.goods.service;

import com.alex.core.entity.ApiResponse;
import com.alex.goods.entity.dos.Category;
import com.alex.goods.entity.dto.CategoryQueryDTO;
import com.alex.goods.entity.dto.CategorySaveDTO;
import com.alex.goods.entity.dto.CategoryUpdateDTO;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author cb
 * @date 2019/11/13 11:35
 */
public interface CategoryService extends IService<Category> {
    /**
     * 新增
     *
     * @param request
     * @return
     */
    ApiResponse save(CategorySaveDTO request);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    ApiResponse remove(Integer id);

    /**
     * 查询单个
     *
     * @param id
     * @return
     */
    ApiResponse get(Integer id);

    /**
     * 修改
     *
     * @param request
     * @return
     */
    ApiResponse update(CategoryUpdateDTO request);

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    ApiResponse page(CategoryQueryDTO request);

}
